Skip to content

Conversation

@pragyasingh7
Copy link
Contributor

No description provided.

@zudi-lin zudi-lin merged commit b6948eb into PytorchConnectomics:master May 15, 2019
@pragyasingh7 pragyasingh7 deleted the fix-typo branch May 21, 2019 19:09
zudi-lin pushed a commit that referenced this pull request Apr 17, 2020
donglaiw pushed a commit that referenced this pull request Nov 14, 2025
…ion configurable

Changes:
1. Phase 2.2: Remove dummy validation dataset workaround (lit_data.py)
   - Replaced DummyDataset with proper warning when validation fails
   - More honest error handling instead of masking configuration issues

2. Phase 2.3: Make hardcoded deep supervision values configurable (hydra_config.py, lit_model.py)
   - Added ModelConfig fields:
     * deep_supervision_weights (default: [1.0, 0.5, 0.25, 0.125, 0.0625])
     * deep_supervision_clamp_min (default: -20.0)
     * deep_supervision_clamp_max (default: 20.0)
   - Updated lit_model.py to use configurable values in 3 locations:
     * Multi-task output clamping
     * Deep supervision output clamping
     * Deep supervision scale weights with validation

Benefits:
- Users can now customize deep supervision behavior without code changes
- Removes technical debt items #2 and #4 from REFACTORING_PLAN.md
- Better error handling for missing validation data
donglaiw pushed a commit that referenced this pull request Nov 14, 2025
Split the monolithic lit_model.py (1846 lines) into focused, maintainable modules:
- lit_model.py (539 lines, 71% reduction): Core Lightning orchestration
- deep_supervision.py (404 lines): Deep supervision and multi-task learning
- inference.py (868 lines): Sliding window inference, TTA, postprocessing
- debugging.py (173 lines): NaN detection and debugging utilities

Key improvements:
- Eliminated code duplication through delegation pattern
- Clear separation of concerns with single responsibility per module
- Improved maintainability and testability
- No backward compatibility methods (clean design per user requirement)

All modules pass Python syntax compilation. Integration tests pending.

Closes #2.1 in REFACTORING_PLAN.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants